]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Don't use g_memmove()
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 17 Jul 2019 15:20:08 +0000 (17:20 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 19 Jul 2019 17:43:56 +0000 (17:43 +0000)
Glib stopped providing any fallback implementations on systems without
memmove() all the way back in 2013. Since then, the symbol is a simple
macro around memmove(); use that function directly now that glib added
a deprecation warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/632

src/shell-secure-text-buffer.c

index 0f33a5df98f880ce85e83d1ab8d0c1c8fa4b403f..03af451ba9117c952ca01555ebc79a594b5a11d9 100644 (file)
@@ -108,7 +108,7 @@ shell_secure_text_buffer_real_insert_text (ClutterTextBuffer *buffer,
 
   /* Actual text insertion */
   at = g_utf8_offset_to_pointer (self->text, position) - self->text;
-  g_memmove (self->text + at + n_bytes, self->text + at, self->text_bytes - at);
+  memmove (self->text + at + n_bytes, self->text + at, self->text_bytes - at);
   memcpy (self->text + at, chars, n_bytes);
 
   /* Book keeping */
@@ -138,7 +138,7 @@ shell_secure_text_buffer_real_delete_text (ClutterTextBuffer *buffer,
       start = g_utf8_offset_to_pointer (self->text, position) - self->text;
       end = g_utf8_offset_to_pointer (self->text, position + n_chars) - self->text;
 
-      g_memmove (self->text + start, self->text + end, self->text_bytes + 1 - end);
+      memmove (self->text + start, self->text + end, self->text_bytes + 1 - end);
       self->text_chars -= n_chars;
       self->text_bytes -= (end - start);